﻿using System;
using System.Web;
using FFIV.Lib.IView.Articles;
using FFIV.Lib.Model;

public partial class Views_Articles_EditAtricle : System.Web.UI.UserControl, IEditArticle
{
	public string AuthorName
	{
		set { tb_Author.Text = value; }
		get { return tb_Author.Text; }
	}

	public string Title
	{
		set { tb_ArticleTitle.Text = HttpUtility.HtmlDecode(value); }
		get { return HttpUtility.HtmlEncode(tb_ArticleTitle.Text); }
	}

	public CategoryNode Categories
	{
		set { uc_ListCategory.Categories = value; }
	}

	public string Summary
	{
		set { tb_Summary.Text = HttpUtility.HtmlDecode(value); }
		get { return HttpUtility.HtmlEncode(tb_Summary.Text); }
	}

	public string Content
	{
		set { fck_Content.Value = value; }
		get { return fck_Content.Value; }
	}

	public string Tags
	{
		set { tb_Tags.Text = value; }
		get { return tb_Tags.Text; }
	}

	public int CategoryId
	{
		set { uc_ListCategory.SelectedCategoryId = value; }
		get { return uc_ListCategory.SelectedCategoryId; }
	}

	public event EventHandler UpdateArticle
	{
		add { btn_Sub.Click += value; }
		remove { btn_Sub.Click -= value; }
	}

	public event EventHandler AddDraft
	{
		add { btn_Draft.Click += value; }
		remove { btn_Draft.Click -= value; }
	}
}
